package source.s05;

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;


public class XXX {
	public static void main(String[] args) {
		ThreadMXBean threadMx =  ManagementFactory.getThreadMXBean();
		ThreadInfo[] threadinfos = threadMx.dumpAllThreads(false, false);
		for (ThreadInfo threadInfo2 : threadinfos) {
			System.out.println(threadInfo2.getThreadId()+","+threadInfo2.getThreadName());
		}
	}
}
